package mysql

import "gorm.io/gorm"

type Sort struct {
	gorm.Model
	SortName string `gorm:"type:varchar(30);not null;commit:'水果分类名称'"`
}

func (s *Sort) SortFind(db *gorm.DB, name string) error {
	return db.Debug().Where("sort_name=?", name).FirstOrCreate(s).Error
}
